package top.saplf.sileny.main.splash

import android.content.Intent
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import top.saplf.sileny.R
import top.saplf.sileny.base.ui.IActivity
import top.saplf.sileny.main.home.MainActivity

/**
 * @author Saplf on 17/4/8
 */
class SplashActivity : AppCompatActivity(), IActivity {

    override fun onLayoutRes(): Int = R.layout.activity_splash

    override fun onViewCreated(savedInstanceState: Bundle?) {
        startActivity(Intent(this@SplashActivity, MainActivity::class.java))
        // Activity 切换淡入淡出动画
        overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out)
        finish()
    }
}